package net.pr06bot.gui;

import java.awt.Dimension;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.swing.BoxLayout;
import javax.swing.JPanel;

import net.pr06bot.loader.BotApplet;

@SuppressWarnings("serial")
public class MainPanel extends JPanel {
	
	private static final int width = 765;
	private static final int height = 503;
	
	public MainPanel() {
		setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
		setSize(new Dimension(getWidth(), getHeight()));
		setMinimumSize(new Dimension(getWidth(), getHeight()));
		setPreferredSize(new Dimension(getWidth(), getHeight()));
		BotApplet applet = new BotApplet();
		try {
			add(applet.loadStub());
		} catch (Exception e) {
			Logger.getLogger(MainPanel.class.getName()).log(Level.SEVERE, null, e);
		}
	}
	
	@Override
	public final int getWidth() {
		return width;
	}
	
	@Override
	public final int getHeight() {
		return height;
	}

}
